package charstream;

import java.io.*;

public class CharStreamDemo8 {
    public static void main(String[] args) throws IOException {
        // 字符缓冲输入流
        BufferedWriter bw = new BufferedWriter(new FileWriter("F:\\111\\a.txt"));

        // 写出数据
        bw.write(97);
        bw.write("\r\n");
        char[] chars = {97, 98, 99};
        bw.write(chars);
        bw.write("\r\n");
        bw.write(chars, 0, 3);
        bw.write("\r\n");
        bw.write("黑马程序员");
        bw.write("\r\n");
        bw.write("abcdefg", 0, 5);
        bw.flush();
        bw.close();
    }
}
